Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Sep 16, 2024

@staabm staabm marked this pull request as ready for review September 16, 2024 19:34
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type depends on PHP version - https://3v4l.org/vIjsa

if step could be intepreted as int, int is used

and if either start or stop (or step after the transformation to int described above) is float, the type is always list<float>

Copy link
Contributor Author

@staabm staabm Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while I agree with your sentiment I think the extension is already too complicated because it tries to be too smart for the value it produces (and I am pretty sure the already existing logic contains more bugs then the one this PR fixes)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be non-empty-list<float>.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@ondrejmirtes ondrejmirtes merged commit 7a6a0fa into phpstan:1.12.x Sep 19, 2024
473 of 499 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants